---@diagnostic disable: undefined-field, param-type-mismatch
local extension=Package("xiaobai-eleven")
extension.extensionName="xiaobai"

Fk:loadTranslationTable{
    ["xiaobai-eleven"]="十一届小白杯",
    
}
local U = require "packages/utility/utility"
local DIY = require "packages/diy_utility/diy_utility"

--[[]
--一个记录打印武将名及其翻译的函数，打印到packages/xiaobai/name.txt里
local whitelist={"moepack","hegemony","rbaijiang","hanqing","xiaobai","bshighlights","aaa_fengqi","aaa_fenghou",
"sashiko","tyj","teyvat_travel_log","aaa_steam","tuntian_studio","ol"}
local function PrintGeneralNames()
  local file = io.open("packages/xiaobai/name.txt", "w")
  if not file then return end
  
  for _, pack in ipairs(whitelist) do
    local extension = Fk.extensions[pack]
    if extension then
      for _, package_name in ipairs(extension) do
        local ps=Fk.packages[package_name]
        if ps and #ps.generals > 0 then
          for __, gen in ipairs(ps.generals) do
            local name = gen.name
            local trans = Fk.translations["zh_CN"][name] or ""
            file:write(string.format("%s ,%s\n", name, trans))
          end
        end
      end
    end

  end
  
  file:close()
end

local print_names = fk.CreateTriggerSkill{
  name = "#print_general_names",
  events = {fk.GameStart},
  global = true,
  can_trigger = function() return true end,
  on_cost = function() return true end,
  on_use = function() 
    PrintGeneralNames() 
    D
  end,
}

Fk:addSkill(print_names)

--]]

local function AddWinAudio(general)
  local Win = fk.CreateActiveSkill{ name = general.name.."_win_audio" }
  Win.package = extension
  Fk:addSkill(Win)
end

local yangyong = General(extension, "xiaobai-eleven__yangyong", "shu", 3)

local youjian = fk.CreateActiveSkill{
  name = "xiaobai__youjian",
  anim_type = "support",
  target_num = 1,
  card_num = 0,
  card_filter = Util.FalseFunc,
  target_filter = function (self, to_select, selected, selected_cards, card, extra_data)
    local target = Fk:currentRoom():getPlayerById(to_select)
    return #selected == 0 and target:getHandcardNum() > 0 and to_select ~= Self.id and Self:usedSkillTimes(self.name) == 0
  end,
  can_use = function (self, player, card, extra_data)
    return player:hasSkill(self) and player:getHandcardNum() > 0
  end,
  on_use = function (self, room, effect)
    local player = room:getPlayerById(effect.from)
    local target = room:getPlayerById(effect.tos[1])
    local self_card = player:getCardIds("h")
    local target_card = target:getCardIds("h")
    local chooseCards = U.askForExchange(player, "#TargetHand", "#SelfHand",target_card, self_card, "#yongjian-exchange", 2)
    if chooseCards == nil then
      return false
    end
    for index, value in ipairs(room:getAlivePlayers()) do
      if value:getMark("youjian") ~= 0 then
        room:setPlayerMark(value,"youjian",0)
      end
    end
    room:setPlayerMark(target,"youjian",1)
    local trans1 = table.filter(self_card,function (element, index, array)
      return table.contains(chooseCards,element)
    end)
    local trans2 = table.filter(target_card,function (element, index, array)
      return table.contains(chooseCards,element)
    end)
    U.swapCards(room,player,player,target,trans1,trans2,self.name)
    room:addPlayerMark(target,"@@youjian-turn")
    table.forEach(trans2,function (element, index, array)
      room:addCardMark(Fk:getCardById(element),"@@youjian-turn")
    end)
  end
}

local youjian_use = fk.CreateTriggerSkill{
  name = "#youjian_use",
  mute = true,
  events = {fk.CardUseFinished},
  can_trigger = function (self, event, target, player, data)
    if not (player:hasSkill(self) and player:hasSkill(youjian) and data.card.is_damage_card) then return false end
    return #table.filter(Card:getIdList(data.card), function(id)
      return Fk:getCardById(id):getMark("@@youjian-turn") > 0
    end) > 0 
  end,
  on_trigger = function (self, event, target, player, data)
    local num = #table.filter(Card:getIdList(data.card), function(id)
      return Fk:getCardById(id):getMark("@@youjian-turn") > 0
    end)
    for _ = 1, num, 1 do
      local tos = table.filter(player.room:getOtherPlayers(player),function (element, index, array)
        return element:getMark("@@youjian-turn") > 0
      end)
      for index, value in ipairs(tos) do
        self:doCost(event, value, player, data)
      end
    end
  end,
  on_cost = function (self, event, target, player, data)
    return player.room:askForSkillInvoke(player,self.name,nil,"#youjian-use::"..target.id)
  end,
  on_use = function (self, event, target, player, data)
    player:broadcastSkillInvoke("youjian")
    player:drawCards(1,self.name)
    target:drawCards(1,self.name)
  end
}

youjian:addRelatedSkill(youjian_use)

local zhongxi = fk.CreateTriggerSkill{
  name = "xiaobai__zhongxi",
  events = {fk.EventPhaseStart},
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(self) and target.phase == Player.Discard
  end,
  on_cost = function (self, event, target, player, data)
    local to = nil
    for index, value in ipairs(player.room:getAlivePlayers()) do
      if value:getMark("youjian") > 0 then
        to = value
        break
      end
    end
    if to == nil then
      return false
    end
    self.cost_data = {}
    if player.room.current == player then
      self.cost_data.from = player
      self.cost_data.to = to
    elseif player.room.current == to then
      self.cost_data.from = to
      self.cost_data.to = player
    else
      return false
    end
    local num = self.cost_data.from:getHandcardNum() - self.cost_data.from:getMaxCards()
    if num>0 then
      local cards = player.room:askForDiscard(self.cost_data.to,1,num,false,self.name,true,".","#zhongxi-use::"..self.cost_data.from.id..":"..num,true)
      if cards and #cards>0 then
        self.cost_data.cards = cards
        return true
      end
    end
    return false
  end,
  on_use = function (self, event, target, player, data)
    local to = self.cost_data.to
    local from = self.cost_data.from
    local room = player.room
    local cards = self.cost_data.cards
    local kongcheng = false
    if to:getHandcardNum() == #cards or #cards == self.cost_data.from:getHandcardNum() - self.cost_data.from:getMaxCards() then
      kongcheng = true
    end
    room:throwCard(cards,self.name,to,to)
    if to:isAlive() then
      room:addPlayerMark(from, MarkEnum.AddMaxCards.."-turn", #cards)
      if kongcheng then
        if room:askForSkillInvoke(player,self.name,nil,"#zhongxi-award::"..to.id) then
          if room:askForSkillInvoke(player,self.name,nil,"#zhongxi-recoverOrNot::"..to.id) then
            if to:isWounded() then
              room:recover({
                who = to,
                num = 1,
                recoverBy = player,
                skillName = self.name
              })
            end
          else
            to:drawCards(2,self.name)
          end
        end
      end
    end
  end
}

yangyong:addSkill(zhongxi)
yangyong:addSkill(youjian)

Fk:loadTranslationTable{
  ["xiaobai-eleven__yangyong"] = "杨颙",
  ["#xiaobai-eleven__yangyong"] = "惜相疲行",
  ["designer:xiaobai-eleven__yangyong"] = "小叶子",
  ["illustrator:xiaobai-eleven__yangyong"] = "查无",
  ["xiaobai__youjian"] = "忧谏",
  [":xiaobai__youjian"] = "出牌阶段限一次，你可以观看一名其他角色所有手牌并用至多两张手牌交换其中等量的牌。你于本回合使用以此获得的伤害牌后，可与其各摸一张牌。",
  ["#youjian-use"] = "你可以与 %dest 各摸一张牌各摸一张牌",
  ["@@youjian"] = "忧谏",
  ["@@youjian-turn"] = "忧谏",
  ["#yongjian-exchange"] = "忧谏：交换至多两张牌",
  ["xiaobai__zhongxi"] = "忠惜",
  ["#TargetHand"] = "对方手牌",
  ["#SelfHand"] = "你的手牌",
  [":xiaobai__zhongxi"] = "你/上次“忧谏”交换牌的目标的弃牌阶段开始时，其/你可以弃置至多X张手牌令你/其手牌上限增加等量，"..
    "然后你可以令因此弃置了X张或全部手牌的角色回复1点体力或摸两张牌(X为本回合角色需弃置的牌数)。",
  ["#zhongxi-award"] = "忠惜：你可以令 %dest 回复体力或摸两张牌",
  ["#zhongxi-recoverOrNot"] = "忠惜：你可以令 %dest 回复1点体力，或点击取消令其摸两张牌",
  ["#zhongxi-use"] = "忠惜：你可以弃置至多 %arg 令 %dest 本回合手牌上限增加等量"
}

local shenyiDuelSkill = fk.CreateActiveSkill{
  name = "duel",
  prompt = "#shenyi_duel-prompt",
  can_use = Util.CanUse,
  mod_target_filter = function(self, to_select, selected, player, card)
    return to_select ~= player.id
  end,
  target_filter = Util.TargetFilter,
  target_num = 1,
  on_effect = function(self, room, effect)
    local to = room:getPlayerById(effect.to)
    local from = room:getPlayerById(effect.from)
    local responsers = { to, from }
    local do_changes = {false,false}
    local refuse = false
    local currentTurn = 1
    local currentResponser = to

    while currentResponser:isAlive() do
      local loopTimes = 1
      if effect.fixedResponseTimes then
        local canFix = currentResponser == to
        if effect.fixedAddTimesResponsors then
          canFix = table.contains(effect.fixedAddTimesResponsors, currentResponser.id)
        end

        if canFix then
          if type(effect.fixedResponseTimes) == 'table' then
            loopTimes = effect.fixedResponseTimes["slash"] or 1
          elseif type(effect.fixedResponseTimes) == 'number' then
            loopTimes = effect.fixedResponseTimes
          end
        end
      end
      local do_change = nil
      if currentResponser.kingdom ~= "wei" and not refuse then
        do_change = room:askForSkillInvoke(currentResponser,"duel",nil,"#shenyi_do_change_country")
        refuse = not do_change
        if refuse then
          effect.additionalDamage = (effect.additionalDamage or 0) + 1
        else
          room:changeKingdom(currentResponser,"wei",true)
          do_changes[currentTurn] = true
          if do_changes[1] and do_changes[2] then
            refuse = true
            room:drawCards(from,2,self.name)
            room:drawCards(to,2,self.name)
          end
        end
      end
      local cardResponded
      if not do_change then
        for i = 1, loopTimes do
          cardResponded = room:askForResponse(currentResponser, 'slash', nil, nil, true, nil, effect)
          if cardResponded then
            room:responseCard({
              from = currentResponser.id,
              card = cardResponded,
              responseToEvent = effect,
            })
          else
            break
          end
        end
      else
        cardResponded = true
      end

      if not cardResponded then
        break
      end

      currentTurn = currentTurn % 2 + 1
      currentResponser = responsers[currentTurn]
    end

    if currentResponser:isAlive() then
      room:damage({
        from = responsers[currentTurn % 2 + 1],
        to = currentResponser,
        card = effect.card,
        damage = 1,
        damageType = fk.NormalDamage,
        skillName = self.name,
      })
    end
  end
}

Fk:addSkill(shenyiDuelSkill)

local shenyi = General:new(extension, "xiaobai-eleven__shenyi", "wei", 4)
shenyi.subkingdom = "shu"

local beibian = fk.CreateViewAsSkill{
  name = "xiaobai__beibian",
  anim_type = "offensive",
  pattern = "duel",
  prompt = "shenyi_duel_use",
  card_filter = function (self, to_select, selected)
    local card = Fk:getCardById(to_select)
    return #selected < 1 and card.type ~= Card.TypeBasic and card:getTypeString() ~= Self:getMark("@beibian-type")
  end,
  card_num = 1,
  view_as = function (self, cards)
    if #cards > 1 or #cards == 0 then return nil end  
    local card = Fk:cloneCard("duel")
    card.skillName = self.name
    card.skill = shenyiDuelSkill
    card:addSubcards(cards)
    return card
  end,
  after_use = function (self, player, use)
    player.room:setPlayerMark(player,"@beibian-type",Fk:getCardById(use.card.subcards[1]):getTypeString())
  end
}
beibian:addAttachedKingdom("shu")

local nisi = fk.CreateTriggerSkill{
  name = "xiaobai__nisi",
  anim_type = "defensive",
  events = {fk.Damage,fk.Damaged},
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(self) and target == player and data.to ~= data.from and data.from ~= nil
  end,
  on_use = function (self, event, target, player, data)
    local players = {data.to,data.from}
    if data.to ~= player then
      players[2] = data.to
      players[1] = data.from
    end
    local room = player.room
    local choice_list = {"nisi-draw"}
    if players[2].kingdom ~= "shu"then
      choice_list = {"nisi-draw","nisi-changeKingdom"}
    end
    local choices = U.doStrategy(room, players[1], players[2], {"nisi-draw","nisi-changeKingdom"}, choice_list, self.name, 0,"nisi-choose")
    if choices[1] == "nisi-changeKingdom" then
      room:changeKingdom(players[1],"shu")
    else
      players[1]:drawCards(1,self.name)
    end
    if choices[2] == "nisi-changeKingdom" then
      room:changeKingdom(players[2],"shu")
    else
      players[2]:drawCards(1,self.name)
    end
    if choices[1] ~= choices[2] then
      if not players[2]:isNude() then
        local card = room:askForCardChosen(player,players[2],'he',self.name,"nisi-obtainCard")
        room:obtainCard(player,card,false)
      end
    end
  end

}
nisi:addAttachedKingdom("wei")

shenyi:addSkill(beibian)
shenyi:addSkill(nisi)

Fk:loadTranslationTable{
  ["xiaobai-eleven__shenyi"] = "申仪",
  ["#xiaobai-eleven__shenyi"] = "枕戈达旦",
  ["designer:xiaobai-eleven__shenyi"] = "食马者",
  ["illustrator:xiaobai-eleven__shenyi"] = "狗爷",
  ["cv:xiaobai-eleven__shenyi"] = "cyc",
  ["xiaobai__beibian"] = "狈变",
  [":xiaobai__beibian"] = "蜀势力技，你可以将一张非基本牌当【决斗】使用（此牌类型须与上次发动此技能转化用的底牌类型不同），"..
                          "此牌的响应方式添加“询问对方是否将势力变更至魏”直到一方拒绝/双方同意后，此牌伤害+1/双方各摸两张牌。",
  ["@beibian-type"] = "狈变",
  ["#shenyi_do_change_country"] = "决斗：是否变更势力至魏以相应此牌",
  
  ["shenyi_duel_use"] = "狈变:你可以将一张非基本牌当【决斗】使用，此【决斗】可以被“变更势力至魏”响应",
  ["xiaobai__nisi"] = "猊伺",
  [":xiaobai__nisi"] = "魏势力技，当你对其他角色造成或受到其他角色造成的伤害后，你可以与其同时选择一项:1.变更势力至蜀；2.摸一张牌；若你与其选择项不同，则你获得其一张牌。",
  ["nisi-draw"] = "摸一张牌",
  ["nisi-changeKingdom"] = "变更势力至蜀",
  [":nisi-changeKingdom"] = "若对方选择摸一张牌，申仪 可以获得对方一张牌。",
  [":nisi-draw"] = "若对方选择变更势力，申仪 可以获得对方一张牌。",
  ["nisi-choose"] = "猊伺：选择一项",
  ["nisi-obtainCard"] = "猊伺：获得其一张牌",

  ["$xiaobai__nisi1"] = "休执迷！皇叔破操，英雄归附，正合天意！",
  ["$xiaobai__nisi2"] = "《诗》云“自求多福”，在我而已，何求他人？",
  ["$xiaobai__beibian1"] = "魏王代汉，天地所兆，吾欲从之久矣！",
  ["$xiaobai__beibian2"] = "吾诚小人，虽不能始终，亦颇识去就之分。",
  ["~xiaobai-eleven__shenyi"] = "早知有命，浪走四方，何苦来哉？"
}

local louxuan = General(extension,"xiaobai-eleven__louxuan", "wu",3)

Fk:loadTranslationTable{
  ["xiaobai-eleven__louxuan"] = "楼玄",
  ["#xiaobai-eleven__louxuan"] = "松栽倒壑",
  ["designer:xiaobai-eleven__louxuan"] = "胖宝宝",
  ["illustrator:xiaobai-eleven__louxuan"] = "NOVART",
}

local linji_chooseCard = fk.CreateActiveSkill{
  name = "#linji_chooseCard",
  interaction = function (self)
    return UI.ComboBox{
      choices = {"Top","Bottom"},
      default = "Top"
    }
  end,
  prompt = "#linji_setCards",
  card_num = 2,
  card_filter = function (self, to_select, selected, selected_targets)
    return not selected or #selected<2
  end
}
Fk:addSkill(linji_chooseCard)

local linji = fk.CreateTriggerSkill{
  name = "xiaobai__linji",
  events = {fk.BeforeHpChanged},
  frequency = Skill.Compulsory,
  can_trigger = function (self, event, target, player, data)
    if target ~= player or not player:hasSkill(self) then
      return false
    end
    local evt = player.room.logic:getEventsOfScope(GameEvent.ChangeHp,2,function (e)
      if e.data[1] == player then
        return true
      end
    end,Player.HistoryTurn)
    return evt == nil or #evt < 2
  end,
  on_cost = function (self, event, target, player, data)
    local skill_target = player.room.current
    if #skill_target:getCardIds("he") < 2 then
      return 
    end
    local _,ret = player.room:askForUseActiveSkill(skill_target,"#linji_chooseCard","#linji_setCards",false)
    if not _ then return false end
    self.cost_data = {}
    self.cost_data.choice = 1
    if ret.interaction == "Bottom" then
      self.cost_data.choice = -1
    end
    self.cost_data.cards = ret.cards
    return true
  end,
  on_use = function (self, event, target, player, data)
    local skill_target = player.room.current
    local index = self.cost_data.choice
    local cards = self.cost_data.cards
    if cards and #cards>0 then
      player.room:moveCards({
        ids = cards,
        from = skill_target.id,
        toArea = Card.DrawPile,
        moveReason = fk.ReasonJustMove,
        skillName = "linji",
        drawPilePosition = index,
      })
    end
    local pos = "Top"
    if  index == 1 then pos = "Bottom" end
    if player.room:askForSkillInvoke(skill_target,self.name,nil,"#linji_askForDraw::"..player.id..":"..Fk:translate(pos)) then
      if index == 1 then
        skill_target:drawCards(2,self.name,"bottom")
      else
        skill_target:drawCards(2,self.name,"top")
      end
      return true
    end
  end
}

Fk:loadTranslationTable{
  ["xiaobai__linji"] = "凛脊",
  [":xiaobai__linji"] = "你的体力值每回合首次发生变化时，当前回合角色须将两张牌置于牌堆顶或牌堆底，"..
  "然后其可以从另一端摸两张牌，防止此体力变化。",
  ["#linji_chooseCard"] = "凛脊",
  ["#linji_setCards"] = "凛脊：将你的两张牌置于牌堆顶或牌堆底",
  ["#linji_askForDraw"] = "凛脊：是否从 %arg 摸两张牌防止 %dest 本次体力变化"
}

local lvgu_viewAndChoose = fk.CreateActiveSkill{
  name = "#lvgu_viewAndChoose",
  expand_pile = function (self)
    return Self:getTableMark("lvgu")
  end,
  interaction = function (self)
    local mark = Self:getTableMark("lvgu_choices")
    return UI.ComboBox{
      choices = mark.choices,
      all_choices = mark.all_choices
    }
  end,
  card_filter = function (self, to_select, selected, selected_targets)
    return false
  end,
}

Fk:addSkill(lvgu_viewAndChoose)

local lvgu = fk.CreateActiveSkill{
  name = "xiaobai__lvgu",
  can_use = function (self, player, card, extra_data)
    return #Fk:currentRoom().draw_pile > 0
  end,
  interaction = function (self)
    local all_choices = {"#lvgu_view1","#lvgu_view3"}
    local choices = {"#lvgu_view1"}
    if #Fk:currentRoom().draw_pile >= 3 then
      table.insert(choices,"#lvgu_view3")
    end
    return UI.ComboBox{
      choices = choices,
      all_choices = all_choices
    }
  end,
  card_filter = Util.FalseFunc,
  card_num = 0,
  on_use = function (self, room, effect)
    local player = room:getPlayerById(effect.from)
    local card_pile = room.draw_pile
    local choice = self.interaction.data
    if choice == "#lvgu_view1" then
      local all_choices = {
        "lvgu_changeHanCardThree","lvgu_Use","lvgu_loseHp",
      }
      local can_choices = {}

      room:setPlayerMark(player,"lvgu",{card_pile[#card_pile]})

      if not player:getMark("@@lvgu_one-turn") or player:getMark("@@lvgu_one-turn") == 0 then
        table.insert(can_choices,all_choices[1])
      end
      table.insert(can_choices,all_choices[2])
      table.insert(can_choices,all_choices[3])

      room:setPlayerMark(player,"lvgu_choices",{choices = can_choices,all_choices = all_choices})
      local _,ret = room:askForUseActiveSkill(player,"#lvgu_viewAndChoose","#lvgu_Choose",false)
      local chosen1 = ret.interaction 

      table.removeOne(can_choices,chosen1)

      room:setPlayerMark(player,"lvgu_choices",{choices = can_choices,all_choices = all_choices})
      _,ret = room:askForUseActiveSkill(player,"#lvgu_viewAndChoose","#lvgu_Choose",false)
      local chosen2 = ret.interaction

      if chosen1 == all_choices[1] or chosen2 == all_choices[1] then
        local num = player:getHandcardNum() - 3
        if num>0 then
          room:askForDiscard(player,num,num,false,self.name,false,".","lvgu_changeHanCardThree")
        elseif num < 0 then
          player:drawCards(-num,self.name)
        end
        room:setPlayerMark(player,"@@lvgu_one-turn",1)
      end
      if player.dead then return end


      if chosen1 == all_choices[2] or chosen2 == all_choices[2] then
        local cards = player:getTableMark("lvgu")
        U.askForUseRealCard(room,player,cards,"^(slash)",self.name,"#lvgu_useOne",{expand_pile = cards})
      end
      if player.dead then return end


      if chosen1 == all_choices[3] or chosen2 == all_choices[3] then
        room:loseHp(player,1,self.name)
      end
    else
      local all_choices = {
        "lvgu_changeHanCardOne","lvgu_Use","lvgu_loseHp",
      }
      local can_choices = {}

      if not player:getMark("@@lvgu_three-turn") or player:getMark("@@lvgu_three-turn") == 0 then
        table.insert(can_choices,all_choices[1])
      end
      table.insert(can_choices,all_choices[2])
      table.insert(can_choices,all_choices[3])

      local cards = table.slice(card_pile,#card_pile-2,#card_pile+1)
      room:setPlayerMark(player,"lvgu",cards)
      room:setPlayerMark(player,"lvgu_choices",{choices = can_choices,all_choices = all_choices})

      local _,ret = room:askForUseActiveSkill(player,"#lvgu_viewAndChoose","#lvgu_Choose",false)
      local chosen1 = ret.interaction 
      table.removeOne(can_choices,chosen1)

      room:setPlayerMark(player,"lvgu_choices",{choices = can_choices,all_choices = all_choices})
      _,ret = room:askForUseActiveSkill(player,"#lvgu_viewAndChoose","#lvgu_Choose",false)
      local chosen2 = ret.interaction

      if chosen1 == all_choices[1] or chosen2 == all_choices[1] then
        if player:getHandcardNum() == 0 then
          player:drawCards(1,self.name)
        else
          local num = player:getHandcardNum() - 1
          if num>0 then
            room:askForDiscard(player,num,num,false,self.name,false,".","lvgu_changeHanCardOne")
          end
        end
        room:setPlayerMark(player,"@@lvgu_three-turn",1)
      end
      if player.dead then return end

      if chosen1 == all_choices[2] or chosen2 == all_choices[2] then
        local cards = player:getTableMark("lvgu")
        U.askForUseRealCard(room,player,cards,"^(slash)",self.name,"#lvgu_useOne",{expand_pile = cards})
      end
      if player.dead then return end

      if chosen1 == all_choices[3] or chosen2 == all_choices[3] then
        room:loseHp(player,1,self.name)
      end
    end
    room:setPlayerMark(player,"lvgu_choices")
    room:setPlayerMark(player,"lvgu")
  end
}
Fk:loadTranslationTable{
  ["xiaobai__lvgu"] = "履骨",
  [":xiaobai__lvgu"] = "出牌阶段，你可以观看牌堆底一/三张牌，然后依次选择两项：1.调整手牌数至三/一(每回合各限选一次)；"..
                      "2.可使用其中一张不为【杀】的牌；3.失去1点体力。",
  ["#lvgu_view1"] = "观看牌堆底的一张牌",
  ["#lvgu_view3"] = "观看牌堆底的三张牌",
  ["lvgu_changeHanCardOne"] = "将手牌调整至一张",
  ["lvgu_changeHanCardThree"] = "将手牌调整至三张",
  ["lvgu_Use"] = "可以使用观看的一张牌",
  ["lvgu_loseHp"] = "失去1点体力",
  ["#lvgu_viewAndChoose"] = "履骨",
  ["#lvgu_viewAndChoose&"] = "牌堆底",
  ["#lvgu_useOne"] = "你可以使用其中一张不为【杀】的牌",
  ["#lvgu_Choose"] = "履骨：请选择一项",
  ["@@lvgu_three-turn"] = "履骨 摸至一",
  ["@@lvgu_one-turn"] = "履骨 摸至三",
}
louxuan:addSkill(linji)
louxuan:addSkill(lvgu)
return extension 